package com.jt.system.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jt.system.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Usefulness: 用途
 * @Author: LeiTing
 * @Date: 2021/9/28  17:01
 * @Version 1.0
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("select id,username,password,status" +
            "from tb_users where username=#{username}")
    User selectUserByUsername(String username);

    /**
     * 基于用户ID查询用户权限
     * @param userId
     * @return
     */
    List<String> selectUserPermissions(Long userId);
}
